{include file="public/header"}
<body>
<style>


</style>
<fieldset class="layui-elem-field">
    <legend>日志列表</legend>
    <div class="layui-field-box">
        <form class="layui-form" id="form-admin-add" action="">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <select name="type">
                        <option value="">请选择查询方式</option>
                        <option value="1">操作URL</option>
                        <option value="2">用户昵称</option>
                        <option value="3">用户ID</option>
                    </select>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline" style="width: 300px;">
                        <input type="text" name="keyword" placeholder="请输入关键词" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <span class="layui-btn sub">查询</span>
                </div>
            </div>
        </form>
        <table class="layui-table" id="list-admin" lay-even>
            <thead>
                <tr>
                    <th>ID</th>
                    <th>行为名称</th>
                    <th>执行时间</th>
                    <th>操作者ID</th>
                    <th>操作者昵称</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {volist name="list" id="vo"}
                    <tr>
                        <td>{$vo['id']}</td>
                        <td>{$vo['action']}</td>
                        <td>{$vo['create_time']}</td>
                        <td>{$vo['operation_id']}</td>
                        <td>{$vo['operation_name']}</td>
                        <td>
                            <span data-url="{:url('logDetail', array('id' => $vo['id']))}" class="layui-btn detail">查看详情</span>
                        </td>
                    </tr>
                {/volist}
            </tbody>
        </table>
    </div>
</fieldset>


{include file="public/footer"}
<script>
    layui.use(['layer'], function() {
        $('.detail').on('click', function () {
            var ownObj = $(this);
            layer.open({
                type: 2,
                area: ['90%', '90%'],
                maxmin: true,
                content: ownObj.attr('data-url')
            });
        });
    });
</script>
</body>
</html>